<?php
namespace app\common\validate;

use think\Validate;

class SkuValueValidate extends Validate
{
    protected $rule =   [
        'id'               => 'require|number',
        'page|页数'        => 'require|number',
        'limit|条数'       => 'require|number',
        'sku_id|属性'      => 'require|number',
        'name|属性值'      => 'require|length:2,30',
    ];
    
    protected $scene = [
        /** admin */
        'show'   => ['id'],
        'list'   => ['page', 'limit'],
        'add'    => ['sku_id', 'name'],
        'edit'   => ['id', 'name'],
    ];
}